package ${package};

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.enums.CoreDictType;
import com.ibeetl.admin.core.web.query.PageParam;
import java.util.Date;
import com.sdx.common.utils.Utils;
/**
 *${entity.displayName}查询
 */
public class ${entity.name}Query extends PageParam {
    @for(attr in attrs) {
        @if(isNotEmpty(attr.dictType)) {
    \@Query(name = "${attr.displayName}", display = true,type=Query.TYPE_DICT,dict="${attr.dictType}")
        @}else {
    \@Query(name = "${attr.displayName}", display = true)        
        @}
        @if(attr.javaType=="Date") {
	private String ${attr.name};
	private Date ${attr.name}Start;
	private Date ${attr.name}End;
		@} else {
    private ${attr.javaType} ${attr.name};
		@}
    @}
    @for(attr in attrs) {
		@if(attr.javaType=="Date") {
	public String get${upperFirst(attr.name)}(){
		return  ${attr.name};
	}
	public void set${upperFirst(attr.name)}(String ${attr.name} ){
		this.${attr.name} = ${attr.name};
		Date[] timePair = Utils.parseQueryTime(${attr.name});
		if (timePair!=null && timePair[0]!=null) {
			this.${attr.name}Start = timePair[0];
		}
		if (timePair!=null && timePair.length==2 && timePair[1]!=null) {
		this.${attr.name}End = timePair[1];
		}

	}
	public Date get${upperFirst(attr.name)}Start(){
		return  ${attr.name}Start;
	}
	public void set${upperFirst(attr.name)}Start(Date ${attr.name}Start ){
		this.${attr.name}Start = ${attr.name}Start;
	}
	public Date get${upperFirst(attr.name)}End(){
		return  ${attr.name}End;
	}
	public void set${upperFirst(attr.name)}End(Date ${attr.name}End ){
		this.${attr.name}End = ${attr.name}End;
	}
		@} else
		@{
    public ${attr.javaType} get${upperFirst(attr.name)}(){
        return  ${attr.name};
    }
    public void set${upperFirst(attr.name)}(${attr.javaType} ${attr.name} ){
        this.${attr.name} = ${attr.name};
    }
		@}
@}
 
}
